home *** CD-ROM | disk | FTP | other *** search
- Path: bmtlh10.bnr.ca!news
- From: John Hickin <hickin@bnr.ca>
- Newsgroups: comp.lang.c,comp.lang.c++
- Subject: Re: Why is C faster than FORTRAN?
- Date: 18 Mar 1996 20:51:34 GMT
- Organization: Bell Northern Research
- Message-ID: <4ikicm$al6@bmtlh10.bnr.ca>
- References: <4hv2ho$d8t@news.interpath.net> <4i2c5e$t70@kiwi.futuris.net> <4i4poj$j7e@thorn.cc.usm.edu>
- NNTP-Posting-Host: bmtlh520.bnr.ca
- Mime-Version: 1.0
- Content-Type: text/plain; charset=us-ascii
- Content-Transfer-Encoding: 7bit
- X-Mailer: Mozilla 1.1 (X11; I; HP-UX A.09.05 9000/715)
- X-URL: news:4i4poj$j7e@thorn.cc.usm.edu
-
- If, as I suspect, your program makes extemsive use of matrices, and you have
- written your own code as opposed to using something like IMSL packages, there
- may be a good reason: FORTRAN stores matrices by columns while C effectively
- stores them by rows. Careful attention is required in the programming to take
- full advantage of the cache. You may find, for example, that transposing your
- matrices and rewriting matrix multiplication to take this into account, will
- make a substantial difference.
-
- --
- John Hickin Nortel Technology, Montreal, Quebec
- (514) 765-7924 hickin@bnr.ca
-
-